package com.kokotchy.tuxcontrol.components;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.kokotchy.tuxcontrol.R;

/**
 * TODO Fill it
 * 
 * $Date: 2009-12-30 15:09:35 +0000 (Wed, 30 Dec 2009) $
 * 
 * @author $Author: kokotchy $
 * @version $Revision: 18 $
 * 
 */
public class EditTextDialog extends Activity {

	@Override
	protected void onCreate(final Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.load_url_attitune);

		setTitle(R.string.title_load_url);

		((Button) findViewById(R.id.bPlay))
				.setOnClickListener(new OnClickListener() {
					@Override
					public void onClick(final View view) {
						String content = ((TextView) findViewById(R.id.etURLAttitune))
								.getText().toString();
						Intent data = new Intent();
						data.putExtra("content", content);
						setResult(RESULT_OK, data);
						finish();
					}
				});
		((Button) findViewById(R.id.bCancel))
				.setOnClickListener(new OnClickListener() {

					@Override
					public void onClick(View v) {
						setResult(RESULT_CANCELED);
						finish();
					}
				});

	}
}
